//
//  FWHomeViewCell.swift
//  DBS
//
//  Created by 王方伟 on 2017/4/20.
//  Copyright © 2017年 wfw. All rights reserved.
//

import UIKit

class FWHomeViewCell: UICollectionViewCell {
    @IBOutlet weak var albumImageView: UIImageView!
    @IBOutlet weak var liveImageView: UIImageView!
    @IBOutlet weak var nickNameLabel: UILabel!
    @IBOutlet weak var onlinePeopleLabel: UIButton!
    
    var modle : FWAnchorModel? {
        didSet {
            albumImageView.setImage(modle!.isEvenIndex ? modle?.pic74 : modle?.pic51, "home_pic_default")
            liveImageView.isHidden = modle?.live == 0
            nickNameLabel.text = modle?.name
            onlinePeopleLabel.setTitle("\(modle?.focus ?? 0)", for: .normal)
        }
    }
    
}
